<!--  -->
<template>
  <div class="content flex flex-column" @click.stop>
    <slot></slot>
    <div class="bottom" v-if="codes&&codes.length">
      <div class="my">我的抽奖号码</div>
      <div class="flex flex-wrap justify-between mt-22">
        <template v-for="(item,index) in codes">
          <span class="lucky-num" :key="index">{{item}}</span>
        </template>
      </div>
    </div>
    <div class="empty-tip" v-else>
      <div class="my">我的抽奖号码</div>
      <div class="color-gray lh-30">
        <div>客官，</div>
        <div>大奖离你不远了，但是</div>
        <div>你还没有活动号码！</div>
        <div>快去购买产品获取吧......</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    codes: {
      type: Array,
      default: () => {
        return [];
      },
      required: true
    }
  },
  data() {
    return {};
  },
  computed: {},
  watch: {},
  methods: {},
  created() {},
  mounted() {},
  updated() {}, //生命周期 - 更新之后
  destroyed() {} //生命周期 - 销毁完成
};
</script>
<style lang='less' scoped>
//@import url(); 引入公共css类
.lh-30 {
  line-height: 30px;
}
.mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  z-index: 998;
  &::before {
    content: "";
    display: inline-block;
    vertical-align: middle;
    height: 100%;
  }
}
.content {
  position: relative;
  padding: 120px 14px 0;
  width: 347px;
  background: #fff;
  box-shadow: 0px 6px 11px 0px rgba(0, 0, 0, 0.26);
  border-radius: 15px;
  animation: show 0.3s 1;

  @keyframes show {
    0% {
      opacity: 0;
      transform: scale(1.5);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }
  .remove {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(0, calc(-50% - 20px));
    height: 27px;
    width: 27px;
    background: url("../assets/imgs/remove.png");
    background-size: 100% 100%;
  }
  .tip {
    position: absolute;
    top: 0;
    left: 33px;
    height: 81px;
    width: 46px;
    background: url("../assets/imgs/flag.png");
    background-size: 100% 100%;
    .word {
      margin-top: 12px;
      font-size: 13px;
      font-weight: 600;
      color: rgba(255, 255, 255, 1);
      line-height: 23px;
      width: 27px;
    }
  }
  .bottom {
    padding: 18px 36px 38px;
    border-top: 1px dashed #fc2802;
    .my {
      font-size: 13px;
      text-align: center;
      color: rgba(59, 59, 59, 1);
      line-height: 16px;
    }
    .flex-wrap {
      flex-wrap: wrap;
    }
    .lucky-num {
      margin-bottom: 15px;
      width: 60px;
      text-align: center;
      font-size: 18px;
      font-weight: bold;
      color: rgba(253, 119, 81, 1);
    }
  }
  .empty-tip {
    padding: 18px 36px 38px;
    border-top: 1px dashed #fc2802;
    text-align: center;
    .my {
      font-size: 13px;
      text-align: center;
      color: rgba(59, 59, 59, 1);
      line-height: 16px;
    }
  }
}
</style>